package com.touchwisdom.fetch.core.web;

import com.jfinal.kit.StrKit;
import com.jfinal.plugin.activerecord.Model;
import com.touchwisdom.fetch.core.model.TFetchConfig;
import com.touchwisdom.modular.common.web.BaseDataGridController;

public class TaskController<M extends Model<M>> extends BaseDataGridController<M> {
	public void taskConfig() {
		// 根配置
		TFetchConfig rootConfig = TFetchConfig.dao.getRootConfig();
		this.setAttr("item", rootConfig);
		// 自定义配置
		String taskId = this.getPara("taskId");
		if (StrKit.notBlank(taskId)) {
			TFetchConfig custom = TFetchConfig.dao.findById(taskId);
			this.setAttr("custom", custom);
		}
	}

	public void taskAppender() {
	}

	public void fixedField() {

	}
}